================www.alamuae.com==================
    
  :
      
      
  
================www.alamuae.com==================
  :

       
         

ALTER TABLE `usergroup` ADD `maxnewthread` INT( 11 ) DEFAULT '0' NOT NULL ;
ALTER TABLE `usergroup` ADD `maxnewtime` INT( 11 ) DEFAULT '0' NOT NULL ;
ALTER TABLE `usergroup` ADD `maxnewpost` INT( 11 ) DEFAULT '0' NOT NULL ;
ALTER TABLE `usergroup` ADD `maxnewposttime` INT( 11 ) DEFAULT '0' NOT NULL ;


***************************************

       :

 : 
1-  : Front-End Error Messages
2-  : no_new_thread_permission
3- :
 ..                   <br>  ( $maxnewthread[number] )   ( $maxnewtime[time] )     


 :
1-  : Front-End Error Messages
2-  : no_new_post_permission
3- :
 ..      (  )              <br>  ( $maxnewthread[number] )  (  )  ( $maxnewtime[time] )     

***************************************

  : vb/admincp/usergroup.php
  :
        'profilepicmaxsize' => 25000

 :
        'profilepicmaxsize' => 25000,
				'maxnewthread' => 5, 'maxnewtime' => 24, 'maxnewpost' => 5, 'maxnewposttime' => 24,

     :
	print_yes_no_row($vbphrase['can_post_threads'], 'usergroup[canpostnew]', $ug_bitfield['canpostnew']);

    :
	print_input_row("    <dfn>        </dfn>", 'usergroup[maxnewthread]', $usergroup['maxnewthread']);
	print_input_row("    <dfn>  (  ) </dfn>", 'usergroup[maxnewtime]', $usergroup['maxnewtime']);


     :
	print_yes_no_row($vbphrase['can_reply_to_others_threads'], 'usergroup[canreplyothers]', $ug_bitfield['canreplyothers']);


    :
	print_input_row("    <dfn>      </dfn>", 'usergroup[maxnewpost]', $usergroup['maxnewpost']);
	print_input_row("    <dfn>   (  ) </dfn>", 'usergroup[maxnewposttime]', $usergroup['maxnewposttime']);

   

***************************************

  : vb/newthread.php

  :

// ############################### start new thread ###############################
if ($_REQUEST['do'] == 'newthread')
{


    :

	$maxnewthread = $DB_site->query_first("
		SELECT maxnewthread AS number FROM " . TABLE_PREFIX . "usergroup 
		WHERE usergroupid=$bbuserinfo[usergroupid] 
	");
	$maxnewtime = $DB_site->query_first("
		SELECT maxnewtime AS time FROM " . TABLE_PREFIX . "usergroup 
		WHERE usergroupid=$bbuserinfo[usergroupid] 
	");

	$definedtime = ($maxnewtime[time] * 3600);
	$limit = TIMENOW - $definedtime;
	$recentthreadcount = $DB_site->query_first("
		SELECT COUNT(*) AS total
		FROM " . TABLE_PREFIX . "thread 
		WHERE postuserid=$bbuserinfo[userid] 
		AND dateline >= $limit
	");

	if ($recentthreadcount[total] > $maxnewthread[number]) {
		eval(print_standard_error('error_no_new_thread_permission'));
	}


   
***************************************

  : vb/newreply.php

  :

// sanity checks...
if (empty($_REQUEST['do']))
{
	$_REQUEST['do'] = 'newreply';
}



    :

	$maxnewpost = $DB_site->query_first("
		SELECT maxnewpost AS number FROM " . TABLE_PREFIX . "usergroup 
		WHERE usergroupid=$bbuserinfo[usergroupid] 
	");
	$maxnewposttime = $DB_site->query_first("
		SELECT maxnewposttime AS time FROM " . TABLE_PREFIX . "usergroup 
		WHERE usergroupid=$bbuserinfo[usergroupid] 
	");

	$definedtime = ($maxnewposttime[time] * 3600);
	$limit = TIMENOW - $definedtime;
	$recentpostcount = $DB_site->query_first("
		SELECT COUNT(*) AS total
		FROM " . TABLE_PREFIX . "post 
		WHERE userid=$bbuserinfo[userid] 
		AND dateline >= $limit
	");

	if ($recentpostcount[total] > $maxnewpost[number]) {
		eval(print_standard_error('error_no_new_post_permission'));
	}


       


================www.alamuae.com==================
================www.alamuae.com==================